package com.zhilian.hzrf_oa.mvp.login.presenter;

import com.colin.base.BasePresenter;
import com.zhilian.hzrf_oa.mvp.login.model.ILoginModel;
import com.zhilian.hzrf_oa.mvp.login.model.LoginModel;
import com.zhilian.hzrf_oa.mvp.login.view.ILoginView;

/**
 * Created by colin on 2018/2/8 9:22 .
 */

public class LoginPresenter implements BasePresenter ,ILoginModel.Callback{
	private ILoginModel mModel;
	private ILoginView mView;

	public LoginPresenter(ILoginView view) {
		mView = view;
		mModel = new LoginModel();
	}

	public void login(String userName, String passWord) {
		mModel.login(userName,passWord,this);
	}

	@Override
	public void onSuccess() {
		mView.login();
	}
}
